Initializing Mutually Referential Abstract Objects: The Value Recursion Challenge
نویسنده
چکیده
Mutual dependencies between objects arise frequently in programs, and programmers must typically solve this value recursion by manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This paper aims to augment ongoing theoretical work on value recursion with a description of a semi-safe mechanism for a generalized form of value recursion in an ML-like language, where initialization corresponds to a graph of lazy computations whose nodes are sequentially forced, requiring runtime checks for soundness during initialization in the style of Russo. Our primary contribution is to use the mechanism to develop compelling examples of how the absence of value recursion leads to real problems in the presence of abstraction boundaries, and give micro-examples that characterize how initialization graphs permit more programs to be expressed in the mutation-free fragment of ML. Finally we argue that in heterogeneous programming environments semi-safe variations on valuerecursion may be appropriate for ML-like languages, because initialization effects from external libraries are difficult to characterize, document and control.
منابع مشابه
An Alternative Approach to Initializing Mutually Referential Objects
Mutual dependencies between objects arise frequently in programs, and programmers must typically resort to manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This report describes a “base-line” proposal for a generalized form of value recursion in an ML-like language called initialization graphs, where...
متن کاملProgramming Objects with ML-ART, an Extension to ML with Abstract and Record Types
Class-based objects can be programmed directly and ee-ciently in a simple extension to ML. The representation of objects, based on abstract and record types, allows all usual operations such as multiple inheritance, object returning capability, and message transmission to themselves as well as to their super classes. There is, however, no implicit coercion from objects to corresponding ones of ...
متن کاملA Critical Evaluation on Programming Paradigms to Achieve Optimal Resource Utilization of Mobile Softwares in Mobile Devices
This paper evaluates the features of mainstream programming paradigms. Imperative, object oriented programming and functional programming concepts are considered here. This is an effort to identify the programming paradigms which consume less resource from mobile devices. Designers usually depend on the programming languages, language oriented programming design is in current practice. Choosing...
متن کاملDomain Theory for Modeling OOP: A Summary (Domain Theory for The Construction of NOOP, and The Construction of COOP as a Step Towards Constructing NOOP)
Domain theory is ‘a mathematical theory that serves as a foundation for the semantics of programming languages’ [AJ94]. Domains form the basis of a theory of partial information, which extends the familiar notion of partial function to encompass a whole spectrum of “degrees of definedness”, so as to model incremental higher-order computation (i.e., computing with infinite data values, such as f...
متن کاملDomain Theory for Modeling OOP: A Summary (Domain Theory for The Construction of NOOP, and The Construction of COOP as a Step Towards Constructing NOOP)
Domain theory is ‘a mathematical theory that serves as a foundation for the semantics of programming languages’ [AJ94]. Domains form the basis of a theory of partial information, which extends the familiar notion of partial function to encompass a whole spectrum of “degrees of definedness”, so as to model incremental higher-order computation (i.e., computing with infinite data values, such as f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 148 شماره
صفحات -
تاریخ انتشار 2006